<template>
	<view>
		<view v-if="!generalUser">
			<view class="content" style="margin-top: 100upx;">
				<view style="width: 200upx;height: 200upx;border-radius: 100upx;border: 1px #007AFF solid;overflow: hidden;">
					<image src="../../static/icon/游客头像.jpg" mode="" style="width: 200upx;height: 200upx;" @click="toLoginPage"></image>
				</view>
			</view>
			<view class="content">
				<text style="font-size: 30upx;color: #F0AD4E;">游客/登陆</text>
			</view>
		</view>
		<view v-if="generalUser">
			<view class="content" style="margin-top: 100upx;">
				<view style="width: 200upx;height: 200upx;border-radius: 100upx;border: 1px #007AFF solid;overflow: hidden;">
					<image :src="generalUser.headPortrait" mode="" style="width: 200upx;height: 200upx;"></image>
				</view>
			</view>
			<view class="content">
				<text style="font-size: 30upx;color:#DD524D;">{{generalUser.telphone}}</text>
			</view>
		</view>
		<view class="content">
			<view style="border: 1upx #007AFF solid; width: 70%;"></view>
		</view>	
		<view class="content" style="margin-top: 100upx;">
			<view>
				<text style="font-size: 30upx;color:#36BBFA;">我的订单</text>
			</view>
		</view>
		<view class="content" style="margin-top: 50upx;">
			<view>
				<text style="font-size: 30upx;color:#36BBFA;">代金券</text>
			</view>
		</view>
		<view class="content" style="margin-top: 50upx;">
			<view>
				<text style="font-size: 30upx;color:#36BBFA;">我的评价</text>
			</view>
		</view>
		<view class="content" style="margin-top: 50upx;">
			<view>
				<text style="font-size: 30upx;color:#36BBFA;">修改密码</text>
			</view>
		</view>
		<view class="content" style="margin-top: 50upx;">
			<view>
				<text style="font-size: 30upx;color:#36BBFA;">我的好友</text>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				generalUser:""
			}
		},
		methods: {
			toLoginPage(){
				uni.navigateTo({
					url:"../login_page/login_page"
				})
			}
		},
		onLoad(){
			uni.getStorage({
				key:"generalUser",
				success:(res)=>{
					this.generalUser=res.data
				}
			})
		}
	}
</script>

<style>
.content{
	display: flex;
	justify-content: center;
}
</style>
